package com.tg.data.http.entity;

import android.graphics.Point;

public class DetectionPoint {
    public int x;
    public int y;
    public float dx;
    public float dy;

    public DetectionPoint() {
        this.x = -1;
        this.y = -1;
        this.dx = -1;
        this.dy = -1;
    }

    public DetectionPoint(int x, int y) {
        this.x = x;
        this.y = y;
        this.dx = this.x;
        this.dy = this.y;
    }

    public DetectionPoint(Point src) {
        this.x = src.x;
        this.y = src.y;
        this.dx = src.x;
        this.dy = src.y;
    }

    public void set(int x, int y) {
        this.x = x;
        this.y = y;
        this.dx = this.x;
        this.dy = this.y;
    }

    public void set(float dx, float dy) {
        this.dx = dx;
        this.dy = dy;
        this.x = (int) dx;
        this.y = (int) dy;
    }
}
